package com.framework.workflow.params;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
@ApiModel(value = "处理任务参数说明")
public class CompleteParam implements Serializable {
    @ApiModelProperty(value = "关联的业务编号（必传）", required = true)
    private String businessId;

    @ApiModelProperty(value = "流程实例编号，启动流程后获取（必传）")
    private String procInstId;

    @ApiModelProperty(value = "意见内容，驳回 转办 协办等原因")
    private String description;

    @ApiModelProperty(value = "1退回 0通过")
    private String isReject = "0";

    @ApiModelProperty(value = "人工选择的下一环节处理人集合", notes = "最终设置为。")
    private List<String> selectAssigneeList;

    @ApiModelProperty(value = "其他参数")
    private Map<String,Object> attribute;

    public void addAttribute(String key, Object value) {
        if (null == attribute) {
            attribute = new HashMap<>(16);
        }
        attribute.put(key, value);
    }
}
